import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:'/index'
  },
  {
    path:"/index",
    name:"index",
    component:()=>import('../views/index.vue'),
    children:[
      {
        path:"/home",
        name:'home',
        component:()=>import('../views/home/home.vue')
      },
      {
        path:"/classify",
        name:'classify',
        component:()=>import('../views/classify/classify.vue')
      },
      {
        path:"/shopcar",
        name:'shopcar',
        component:()=>import('../views/shopcar/shopcar.vue')
      },
      {
        path:"/my",
        name:'my',
        component:()=>import('../views/my/my.vue')
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
